package com.jqq.bignum;

import java.math.BigInteger;

/**
 * @author 姬倩倩
 * @version 1.0
 */
public class BigInteger_ {
    public static void main(String[] args) {
        //当编程时需要处理很大的数，而long不够用
        //可以使用BigInteger来搞定
//        long l = 2379999999999999999999999;
        BigInteger bigInteger1 = new BigInteger("2379999999999999999999999");
        BigInteger bigInteger2 = new BigInteger("111");
        //在对BigInteger数据进行加减乘除时，要使用对应的方法，不能直接+ - * /
        System.out.println("加="+bigInteger1.add(bigInteger2));
        System.out.println("减="+bigInteger1.subtract(bigInteger2));
        System.out.println("乘="+bigInteger1.multiply(bigInteger2));
        System.out.println("除="+bigInteger1.divide(bigInteger2));
    }
}
